{extend name='admin@main'}
{block name="button"}
<button data-modal='{:url("add")}' data-title="添加客片分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加客片分类</button>
<button data-action='{:url("del")}' data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除客片分类</button>
{/block}

{block name="content"}
<table class="layui-table" lay-skin="line">
    <caption class="margin-bottom-10 text-left">{include file='customer_cate/index_search'}</caption>
    <!--{notempty name='list'}-->
    <thead>
    <tr>
        <th class='list-table-check-td think-checkbox'>
            <input data-auto-none data-check-target='.list-check-box' type='checkbox'>
        </th>
        <th class='list-table-sort-td'>
            <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
        </th>
        <th class='text-center nowrap'>分类名称</th>
        <th class='text-center nowrap'>副标题</th>
        <th class='text-center nowrap'>图片<span class="nowrap color-red">275*340</span></th>
        <th class="text-center">状态</th>
		<th class="text-center">在首页展示</th>
        <th class="text-center">操作</th>
    </tr>
    </thead>
    <!--{/notempty}-->
    <tbody>
    <!--{foreach $list as $key=>$vo}-->
    <tr >
        <td class='list-table-check-td think-checkbox'>
            <input class="list-check-box" value='{$vo.id}' type='checkbox'>
        </td>
        <td class='list-table-sort-td'>
            <input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input">
        </td>
        <td class='text-center nowrap' data-dbclick>
            {$vo.name|default=''}
        </td>
        <td class='text-center nowrap' data-dbclick>
            {$vo.title|default=''}
        </td>
        <td class='text-center'>
            <img data-tips-image style="width:20px;height:20px" src="{$vo.image|default=''}" class="margin-right-5 text-top">
        </td>
        <td class='text-center nowrap'>
            <input type="checkbox" data-switch="1#0" data-field="status" data-url="{:url('upstatus')}?id={$vo.id}" lay-filter="switch-c-{$vo.id}"
                   {eq name='vo.status' value='1' }checked{/eq} lay-skin="switch"
            lay-text="启用|禁用" value='1'>
        </td>
		<td class='text-center nowrap'>
		    <input type="checkbox" data-switch="1#0" data-field="show_index" data-url="{:url('upindex')}?id={$vo.id}" lay-filter="switch-c1-{$vo.id}"
		           {eq name='vo.show_index' value='1' }checked{/eq} lay-skin="switch"
		    lay-text="启用|禁用" value='1'>
		</td>
        <td class='text-center nowrap '>
            <div class="nowrap nowrap margin-bottom-5">
                {if auth($base_route . "edit")}
                <a  data-title="编辑分类" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {/if}

                {if auth($base_route . "del")}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除数据吗?" data-action="{:url('del')}" data-value="id#{$vo.id}">删 除</a>
                {/if}
            </div>
        </td>
    </tr>
    <!--{/foreach}-->
    </tbody>
</table>

{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

{/block}